﻿using Box2DSharp.Collision.Shapes;
using OpenTK.Mathematics;

namespace TrinityEngine
{
    public class CircleCollider2D : Collider2D
    {
        private CircleShape _shape;

        public Vector2 offset
        {
            get { return _shape.Position; }
            set { _shape.Position = value; }
        }

        public float radius
        {
            get { return _shape.Radius; }
            set { _shape.Radius = value; }
        }

        public CircleCollider2D(float radius)
        {
            _shape = new CircleShape();
            this.radius = radius;
            offset = Vector2.zero;
        }

        public override Shape GetShape()
        {
            return _shape;
        }
    }
}
